package com.b.domain;

import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

/**
    * 弹幕表
    */
@Document(indexName = "danmu")
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Danmu {
    /**
    * 弹幕ID
    */
    @Id
    @Field(type = FieldType.Integer, index = true , store = true)
    private Integer id;

    /**
    * 弹幕内容
    */
    private String content;

    /**
    * 发送者ID
    */
    private Integer userId;

    /**
    * 弹幕颜色
    */
    private String color;

    /**
    * 视频ID
    */
    private Integer videoId;

    /**
    * 弹幕出现时间（秒）
    */
    private Integer timePoint;

    /**
    * 发送时间
    */
    private Date publishTime;
}